import request from "@/request/request.js"
import qs from "qs"
// 精品推荐
export const JingPinAPI = () => request.get("/products/recommend")
// 热门兑换
export const ReMenAPI = () => request.get("/products/hot")

export const SendSMSAPI = (params) => request.post("/sendSMS", qs.stringify(params))
export const PhoneReginAPI = (params) => request.post("/phoneRegin", qs.stringify(params))
export const WeiXinLoginAPI = (params) => request.post("/wechatUsers/PCLogin", qs.stringify(params))
export const BindingAPI = (params) => request.post("/wechatUsers/binding", qs.stringify(params))
export const UserProfilesAPI = () => request.get("/shop/userProfiles")
export const GoodsDetailsAPI = (id) => request.get(`/products/${id}`)
export const CartsAddAPI = (params) => request.post("/shop/carts/add", qs.stringify(params))
export const GoodsSearchAPI = (params) => request.get("/products", { params })  // params:params=>params
export const ShopCartsAPI = () => request.get("/shop/carts")
export const DelShopCartsAPI = (id) => request.delete(`/shop/carts?productIds=${id}`)